@import "~taro-ui/dist/style/components/icon.scss";
@mixin goods-list-item{
  padding: 0 0 32px;
  display: flex;
  .item-img{
    width: 160px;
    height: 160px;
    display: block;
    margin-right: 24px;
    border-radius: 16px;
  }
  .item-info{
    flex: 1;
    display: flex;
    flex-direction: column;
    .info-h2{
      font-size: 32px;
      color: var(--title-color);
      font-weight: bold;
      margin-bottom: 8px;
    }
    .info-sub-title{
      font-size: 24px;
      color: var(--subT-color);
      margin-bottom: 14px;
    }
    .info-span{
      display: flex;
      flex-wrap: wrap;
      .span{
        padding: 4px 8px;
        line-height: 1;
        color: var(--subT-color);
        background: var(--page-bg);
        border-radius: 6px;
        margin-right: 8px;
        margin-bottom: 8px;
        font-size: 20px;
      }
    }
    .info-price{
      display: flex;
      justify-content: space-between;
      margin-top: 32px;
      .box-flex{
        align-items: flex-end;
        line-height: 1;
        font-size: 20px;
      }
      .price-vip{
        color: var(--theme-color);
        margin-top: 8px;
        font-weight: bold;
      }
      .price-del{
        color: var(--subT-color);
        text-decoration: line-through;
      }
      .price-total{
        font-size: 32px;
        color: var(--theme-color);
        margin-right: 8px;
        font-weight: bold;
      }
    }
  }
}
.goods{
  background: var(--page-bg);
  min-height: 100vh;
  .goods-nav-bar{
    color: var(--title-color);
    display: flex;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--page-bg);
    padding-bottom: 36px;
    .box-flex{
      padding: 0 24px;
      align-items: center;
      font-size: 30px;
      font-weight: 700;
      flex-wrap: wrap;
      .distance{
        flex-basis: 100%;
        font-size: 24px;
        color: #989898;
        margin-top: 4px;
        font-weight: 400;
      }
    }
  } //  goods-nav-bar end

  .goods-list{
    display: flex;
    overflow-x: auto;
    padding: 20px;
    padding-right: 0;
    .list-item{
      flex-shrink: 0;
      width: 284px;
      margin-right: 20px;
      position: relative;
      border-radius: 20px;
      overflow: hidden;
      background: #fff;
      .item-icon{
        position: absolute;
        left: 0;
        top: 0;
        width: 72px;
        border-radius: 20px 0;
        line-height: 48px;
        font-size: 24px;
        text-align: center;
        background: var(--theme-color);
        color: #fff;
        z-index: 1;
      }
      .item-img{
        width: 100%;
        height: 284px;
        display: block;
        position: relative;
        .img{
          width: 100%;
          height: 284px;
        }
        .item-h2{
          position: absolute;
          bottom: 0;
          left: 0;
          right: 0;
          background: linear-gradient(180deg, rgba(255, 255, 255, 0) 0%, #FFFFFF 100%);
          padding: 64px 16px 16px;
          box-sizing: border-box;
          color: var(--title-color);
          font-size: 28px;
          font-weight: 700;
        }
      }
      .item-info{
        padding:8px 16px;
        display: flex;
        align-items: center;
        font-size: 24px;
        .info-price{
          color: var(--theme-color);
          font-size: 36px;
        }
        .info-del{
          color: #A5A6A9;
          text-decoration: line-through;
        }
      }
    }
  }  ///  goods-list end
  
  .goods-cate{
    display: flex;
    align-items: flex-start;
    .cate-list{
      width: 160px;
      padding: 0 0 120px;
      height: calc(100vh - 550px);
      overflow-y: auto;
      box-sizing: border-box;
      .list-item{
        width: 160px;
        min-height: 80px;
        display: flex;
        align-items: center;
        flex-direction: column;
        justify-content: center;
        color: #616469;
        font-size: 24px;
        position: relative;
        border-left: 8px solid transparent;
        box-sizing: border-box;
        .item-badge{
          position: absolute;
          right: 0;
          top: 0;
          font-size: 20px;
          background: #f53f3f;
          color: #fff;
          border-radius: 50%;
          min-width: 32px;
          text-align: center;
          line-height: 32px;
        }
        &.active{
          background: #fff;
          color: #1D2129;
          border-color: var(--theme-color);
        }
        .dot{
          width: 100%;
          text-align: center;
        }
      }
    }
    .cate-main{
      flex: 1;
      padding: 24px 24px 120px;
      background: #fff;
      box-sizing: border-box;
      height: calc(100vh - 550px);
      position: relative;
      overflow-y: auto;
      .main-title{
        display: flex;
        justify-content: center;
        align-items: center;
        color: var(--subT-color);
        font-weight: 500;
        font-size: 28px;
        padding-bottom: 32px;
      }
      .main-list{
        .list-item{
          @include goods-list-item;
        }
      }
    }
    .auto-height{
      height: calc(100vh - 208px)!important;
    }
    .cate-settle{
      position: fixed;
      left: 32px;
      right: 32px;
      bottom: 24px;
      border-radius: 100px;
      background: #32040c;
      color: #fff;
      display: flex;
      align-items: center;
      padding: 8px;
      overflow: hidden;
      .settle-icon{
        width: 88px;
        height: 88px;
        display: flex;
        align-items: center;
        justify-content: center;
        position: relative;
        background: #fff;
        border-radius: 100px;
        .icon-drag{
          position: absolute;
          right: 0;
          top: -8px;
          background: var(--theme-color);
          color: #fff;
          border-radius: 100px;
          width: 32px;
          line-height: 32px;
          font-size: 20px;
          text-align: center;
        }
      }
      .settle-price{
        margin-left: 22px;
        margin-right: auto;
        flex: 1;
        font-size: 36px;
        font-weight: 500;
        text-align: left;
      }
      .settle-button{
        background: var(--theme-color);
        font-size: 32px;
        font-weight: 500;
        padding: 0 62px;
        position: absolute;
        right: 0;
        top: 0;
        bottom: 0;
        display: flex;
        align-items: center;
        justify-content: center;
      }
    }  // cate-settle end
  } //  goods-cate end

  .at-action-sheet__container{
    background: transparent;
    padding-bottom: 0;
  }
  .goods-action{
    padding: 32px;
    border-radius: 32px 32px 0 0;
    background: #fff;
    .action-header{
      display: flex;
      align-items: center;
      justify-content: space-between;
      font-size: 24px;
      margin-bottom: 28px;
      color: var(--subT-color);
    }
    .action-list{
      max-height: 700px;
      overflow-y: auto;
    }
    .main-list{
      .list-item{
        display: flex;
        align-items: center;
        justify-content: space-between;
        border-top: 2px solid var(--border-color);
        padding: 32px 0;
        .item-info{
          margin-right: 40px;
          .info-h2{
            font-size: 28px;
            color: var(--title-color);
            font-weight: bold;
            margin-bottom: 8px;
          }
          .info-sub-title{
            font-size: 24px;
            color: var(--subT-color);
          }
        }
        .item-price{
          display: flex;
          align-items: center;
          .price-total{
            font-size: 28px;
            color: var(--title-color);
            font-weight: bold;
            margin-right: 16px;
          }
        }
      }
    }
    .action-footer{
      position: sticky!important;
    }
  }
}